<div class="cv-bootstrap cv-gui-viewcontainer" ng-controller="CubesViewerStudioViewController">

    <div class="panel panel-primary">
        <div ng-if="! cvOptions.hideControls" class="panel-heading">

            <button type="button" ng-click="studioViewsService.closeView(view)" class="btn btn-danger btn-xs pull-right hidden-print" style="margin-left: 10px;"><i class="fa fa-fw fa-close"></i></button>
            <button type="button" ng-click="studioViewsService.toggleCollapseView(view)" class="btn btn-primary btn-xs pull-right hidden-print" style="margin-left: 5px;"><i class="fa fa-fw" ng-class="{'fa-caret-up': !view.collapsed, 'fa-caret-down': view.collapsed }"></i></button>

            <i class="fa fa-fw fa-file"></i> <span class="cv-gui-title" style="cursor: pointer;" ng-dblclick="studioViewsService.studioScope.showRenameView(view)"><a name="cvView{{ view.id }}"></a>{{ view.params.name }}</span>

            <span ng-if="view.savedId > 0 && reststoreService.isViewChanged(view)" class="badge cv-gui-container-state" style="margin-left: 15px; font-size: 80%;">Modified</span>
            <span ng-if="view.savedId > 0 && !reststoreService.isViewChanged(view)" class="badge cv-gui-container-state" style="margin-left: 15px; font-size: 80%;">Saved</span>
            <span ng-if="view.shared" class="badge cv-gui-container-state" style="margin-left: 5px; font-size: 80%;">Shared</span>

            <button type="button" class="btn btn-danger btn-xs" style="visibility: hidden;"><i class="fa fa-fw fa-info"></i></button>

        </div>
        <div class="panel-body" ng-hide="view.collapsed">
            <div class="cv-gui-viewcontent">

                <div cv-view-cube view="view"></div>

            </div>
        </div>
    </div>

</div>
